// 静态路由配置
// 书写格式与动态路由格式一致，全部经由框架统一转换
// 比较动态路由在meta中多加入了role角色权限，为数组类型。一个菜单是否有权限显示，取决于它以及后代菜单是否有权限。
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
// 示例如下

// import HomeView from '@/views/home.vue'
//用户路由
const routes = [
	{
	    id: '6',
	    path: '/dataStatistics',
	    name: 'dataStatistics',
	    title: 'self.menu.dataStatistics',
	    component: 'layouts/BasicLayout',
	    redirect: '/dataStatistics/index',
	    meta: {
	        showMenu: true,
	        icon: 'LineChartOutlined',
	        type: 'menu',
	        role: ['user', '6']	
	    },
	    children: [
	        {
	            id: '6',
	            path: '/dataStatistics/index',
	            name: 'dataStatistics1',
	            component: 'views/dataStatistics/index',
	            title: 'self.menu.dataStatistics',
	            meta: {
	                showMenu: false,
	                icon: '',
	                type: 'menu', 
	                role: ['user', 'admin', '6']
	            }
	        }
	    ]
	},
    {
        id: '2',
        path: '/user',
        name: 'User',
        title: 'self.menu.user',
        component: 'layouts/BasicLayout',
        redirect: '/user/list',
        meta: {
            showMenu: true,
            icon: 'UserOutlined',
            type: 'menu', 
            role: ['user', '2']	
        },
        children: [
            {
                id: '2001',
                path: '/user/list',
                name: 'UserIndex',
                title: 'self.menu.userIndex',
                component: 'views/user/list/index',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu', 
                    role: ['user', '2001']	
                },
            },
            {
                id: '2003',
                path: '/user/charge',
                name: 'UserCharge',
                title: 'self.menu.userCharge',
                component: 'views/user/charge/index',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu',
                    role: ['user', '2003']
                },
            },
            //删除 移动到assets management
            {
                id: '2002',
                path: '/user/bind',
                name: 'UserBind',
                title: 'self.menu.userBind',
                component: 'views/user/bind/index',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu', 
                    role: ['user', '2002']	
                },
            },
        ]
    },
    {
        id: '3',
        path: '/user/agents/main',
        name: 'UserAgentsMain',
        title: 'self.menu.UserAgents',
        component: 'layouts/BasicLayout',
        redirect: '/user/agents',
        meta: {
            showMenu: true, 
            icon: 'UsergroupAddOutlined',
            type: 'title', 
            role: ['user', '3']	
        },
        children: [
            {
                id: '3',
                path: '/user/agents',
                name: 'Agent Top-up Record',
                component: 'views/user/agents/index',
                title: 'self.menu.agent1',
                meta: {
                    showMenu: false,
                    icon: '',
                    type: 'menu', 
                    role: ['user', 'admin', '3']
                }
            }
        ]
    },
    {
        id: '1',
        path: '/business',
        name: 'Business',
        title: 'self.menu.business',
        component: 'layouts/BasicLayout',
        redirect: '/business/postage',
        meta: {
            showMenu: true, 
            icon: 'FormOutlined',
            type: 'menu', 
            role: ['user', '1']	
        },
        children: [
            {
                id: '1001',
                path: '/business/postage',
                name: 'BusinessPostage',
                title: 'self.menu.businessPostage',
                component: 'views/business/postage/index',
                meta: {
                    showMenu: true, 
                    icon: '',
                    type: 'menu', 
                    role: ['user', '1001']	
                },
            },
            //删除 移动到 id 9002
            {
                id: '1002',
                path: '/business/station',
                name: 'BusinessStation',
                title: 'self.menu.businessStation',
                component: 'views/business/station/index',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu', 
                    role: ['user', '1002']
                },
            },
            //删除 移动到 id 900201
            {
                id: '100201',
                path: '/business/charging',
                name: 'BusinessCharging',
                title: 'self.menu.businessCharging',
                component: 'views/business/charging/index',
                meta: {
                    showMenu: false, 
                    icon: '',
                    type: 'menu', 
                    role: ['user','100201']	
                },
            },
            {
                id: '1003',
                path: '/business/operators',
                name: 'BusinessOperators',
                title: 'self.menu.operators',
                component: 'views/business/operators/index',
                meta: {
                    showMenu: true, 
                    icon: '',
                    type: 'menu',
                    role: ['user', '1003']
                },
            },
            //新增
            // {
	        //     id: '1004',
	        //     path: '/report/TotalChargingReport',
	        //     name: 'TotalChargingReport',
	        //     component: 'views/report/TotalChargingReport/index',
	        //     title: 'self.menu.TotalChargingReport',
	        //     meta: {
	        //         showMenu: true, 
	        //         icon: '',
	        //         type: 'menu',
	        //         role: ['user', '1004']
	        //     }
	        // },
        ]
    },
	{
	    id: '4',
	    path: '/order',
	    name: 'Order',
	    title: 'self.menu.order',
	    component: 'layouts/BasicLayout',
	    redirect: '/order/charging',
	    meta: {
	        showMenu: true, 
	        icon: 'CheckCircleOutlined',
	        type: 'title', 
	        role: ['user', '4']	
	    },
	    children: [
	        {
	            id: '4001',
	            path: '/order/charging',
	            name: 'OrderCharging',
	            title: 'self.menu.orderCharging',
	            component: 'views/order/charging',
	            meta: {
	                showMenu: true,
	                icon: '',
	                type: 'menu', 
	                role: ['user', '4001']
	            },
	        },
	        {
	            id: '4002',
	            path: '/order/history',
	            name: 'OrderHistory',
	            title: 'self.menu.orderHistory',
	            component: 'views/order/history',
	            meta: {
	                showMenu: true,
	                icon: '',
	                type: 'menu', 
	                role: ['user', '4002']
	            },
	        },
	        {
	            id: '4003',
	            path: '/order/settled',
	            name: 'OrderSettled',
	            title: 'self.menu.orderToBeSettled',
	            component: 'views/order/settled',
	            meta: {
	                showMenu: true,
	                icon: '',
	                type: 'menu',
	                role: ['user', '4003']
	            },
	        },
	    ]
	},


	{
	    id: '7',
	    path: '/report',
	    name: 'report',
	    redirect: '/report/TotalChargingReport',
	    component: 'layouts/BasicLayout',
	    title: 'self.menu.report',
	    meta: {
	        showMenu: true,
	        icon: 'BarsOutlined',
	        type: 'menu',
	        role: ['user', '7']	
	    },
	    children: [
            //删除 - 移动到 1 改为1004
	        {
	            id: '7001',
	            path: '/report/TotalChargingReport',
	            name: 'TotalChargingReport',
	            component: 'views/report/TotalChargingReport/index',
	            title: 'self.menu.TotalChargingReport',
	            meta: {
	                showMenu: true, 
	                icon: '',
	                type: 'menu',
	                role: ['user', '7001']
	            }
	        },
	        {
	            id: '7002',
	            path: '/report/RechargeReport',
	            name: 'RechargeReport',
	            component: 'views/report/RechargeReport/index',
	            title: 'self.menu.RechargeReport1',
	            meta: {
	                showMenu: true,
	                icon: '',
	                type: 'menu',
	                role: ['user', '7002']
	            }
	        },
            {
	            id: '7003',
	            path: '/report/agent',
	            name: 'agent',
	            component: 'views/report/agent/index',
	            title: 'self.menu.agent',
	            meta: {
	                showMenu: true, 
	                icon: '',
	                type: 'menu',
	                role: ['user', '7003']
	            }
	        }
	    ]
	},
    //新增
    // {
	//     id: '9',
	//     path: '/assetManagement',
	//     name: 'assetManagement',
	//     title: 'self.menu.assetManagement',
	//     component: 'layouts/BasicLayout',
	//     redirect: '/assetManagement/station/index',
	//     meta: {
	//         showMenu: true,
	//         icon: 'BellOutlined',
	//         type: 'menu',
	//         role: ['user', '9']	
	//     },
	//     children: [
    //         //新增-移动来的
    //         {
    //             id: '9002',
    //             path: '/assetManagement/station',
    //             name: 'BusinessStation',
    //             title: 'self.menu.businessStation',
    //             component: 'views/assetManagement/station/index',
    //             meta: {
    //                 showMenu: true,
    //                 icon: '',
    //                 type: 'menu',
    //                 role: ['user', '9002']
    //             },
    //         },
    //         //新增- 移动来的
    //         {
    //             id: '900201',
    //             path: '/assetManagement/charging',
    //             name: 'BusinessCharging',
    //             title: 'self.menu.businessCharging',
    //             component: 'views/assetManagement/charging/index',
    //             meta: {
    //                 showMenu: false,
    //                 icon: '',
    //                 type: 'menu',
    //                 role: ['user','900201']	
    //             },
    //         },

    //         //新增
    //         {
	//             id: '9003',
	//             path: '/assetManagement/rifd',
	//             name: 'List Of Keyfob RIFD',
	//             component: 'views/assetManagement/rifd/index',
	//             title: 'self.menu.RIFDList',
	//             meta: {
	//                 showMenu: false,
	//                 icon: '',
	//                 type: 'menu', 
	//                 role: ['user', 'admin', '9']
	//             }
	//         }
	//     ]
	// },
	// {
	//     id: '8',
	//     path: '/notification',
	//     name: 'notification',
	//     title: 'self.menu.notification',
	//     component: 'layouts/BasicLayout',
	//     redirect: '/notification/index',
	//     meta: {
	//         showMenu: true,
	//         icon: 'BellOutlined',
	//         type: 'menu',
	//         role: ['user', '8']	
	//     },
	//     children: [
	//         {
	//             id: '8',
	//             path: '/notification/index',
	//             name: 'notification1',
	//             component: 'views/notification/index',
	//             title: 'self.menu.notification',
	//             meta: {
	//                 showMenu: false,
	//                 icon: '',
	//                 type: 'menu', 
	//                 role: ['user', 'admin', '8']
	//             }
	//         }
	//     ]
	// },



    {
        id: '5',
        path: '/system',
        name: 'System',
        redirect: '/system/user',
        component: 'layouts/BasicLayout',
        title: 'self.menu.system',
        meta: {
            showMenu: true,
            icon: 'SettingOutlined',
            type: 'menu', 
            role: ['user', '5']	
        },
        children: [
            {
                id: '5001',
                path: '/system/user',
                name: 'SystemUser',
                component: 'views/system/user/index',
                title: 'self.menu.systemUser',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu',
                    role: ['user', '5001']
                }
            },
            {
                id: '5002',
                path: '/system/account',
                name: 'SystemAccount',
                component: 'views/system/account/index',
                title: 'self.menu.systemAccount',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu',
                    role: ['user', '5002']
                }
            },
            {
                id: '5003',
                path: '/system/params',
                name: 'SystemParams',
                component: 'views/system/params/index',
                title: 'self.menu.systemParams',
                meta: {
                    showMenu: true,
                    icon: '',
                    type: 'menu',
                    role: ['user', '5003']
                }
            }
        ]
    },

	{
	    path: '/dashboard',
	    name: 'dashboard',
	    redirect: '/dashboard/index',
	    component: 'layouts/BasicLayout',
	    title: 'self.menu.dashboard',
	    meta: {
	        showMenu: false,
	        icon: 'DashboardOutlined',
	        type: 'menu',
	        role: ['user']
	    },
	    children: [
	        {
	            path: '/dashboard/index',
	            name: 'dashboardIndex',
	            component: 'views/dashboard/index',
	            title: 'self.menu.dashboardIndex',
	            meta: {
	                showMenu: false,
	                icon: 'DashboardOutlined',
	                type: 'menu',
	                role: ['user']
	            }
	        }
	    ]
	},
    // 这个是必须配置的
    {
        id: '999999',
        path: '/:catchAll(.*)',
        redirect: '/404',
        title: 'self.menu.notFound',
        meta: {
            showMenu: false
        }
    },
]

export default routes
